<template>
  <div id="app">
    <top250 v-for="item of value" :key="item._id" :data="item"></top250>
    <div class="">{{time}}</div>
  </div>
</template>

<script>
import top250 from "./components/top250.vue";
import axios from "axios";

export default {
  name: "App",
  components: {
    top250
  },
  data() {
    return {
      value: [],
      time:1
    };
  },
  mounted() {
    axios({
      method: "get",
      url: "http://127.0.0.1:7001/top250",
    }).then(res => {
      this.value = res.data.data;
      console.log(this.time);
    });

    axios({
      method:'post',
      url: "http://localhost:7001/postTest",
      data: {
        id:"123123213123"
      }
    })
  },
  methods: {}
};
</script>

<style>
#app {
  margin: 0 auto;
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 10px 20px;
  width: max-content;
}
</style>
